package com.zdkj.edge.door.demo.callback.dto;

import lombok.Data;

import java.io.Serializable;

/**
 * 描述: 车辆认证信息
 *
 * @author ZlTan
 * @date 2025/04/07 19:59
 */
@Data
public class VehicleAuthorizeDto implements Serializable {
    private static final long serialVersionUID = 333663801820646437L;

    //设备编码,多个以逗号分隔
    private String deviceCode;
    //设备名称,多个以逗号分隔
    private String deviceName;
    //授权开始时间
    private String startTime;
    //授权结束时间
    private String endTime;
    //车牌号
    private String vehicleNo;
    //车辆类型（1: 内部；2: 外部；）
    private Integer vehicleType;
    //人员id
    private String personId;
    //1.新增;2.修改;3.删除
    private Integer opType;

    public AuthorizeInfo transfer() {
        return AuthorizeInfo.builder()
                .mjTyp(AuthorizeInfo.MjTyp.VEHICLE.getCode())
                .mjdId(deviceCode)
                .mjdName(deviceName)
                .startTime(startTime)
                .endTime(endTime)
                .cphnbsht(vehicleNo)
                .usrCod(personId)
                .build();
    }
}
